package chapter02.s04control.while1;

// while 循环语句
public class Example12 {
    public static void main(String[] args) {
        int x = 1;                                    // 定义变量x，初始值为1
        while (x <= 4) {                            // 循环条件
            System.out.println("x = " + x);        // 条件成立，打印x的值
            x++;                                    // x进行自增
        }

        System.out.println("after while, x = " + x);
    }
}
